package com.iyunsir.lesson03;
import java.awt.*;
import java.util.Date;
public class TestPaint {
    public static void main(String[] args) {
        new MyPaint().loadFrame();

    }
}

class MyPaint extends Frame{

    public void loadFrame(){
        setBounds(200,200,600,500);
        setVisible(true);
    }

    @Override
    public void paint(Graphics g) {
//        super.paint(g);
        // 画笔，需要有颜色，画笔可以画画
        g.setColor(Color.red);
        g.drawOval(100,100,100,100); //空心圆
        g.setColor(Color.GREEN);
        g.fillOval(150,200,200,200); //实心圆

        // 养成习惯，画笔画完，将他还原到最初的颜色

    }
}